{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 语言模型\n",
    "\n",
    "> 一句话出现的概率： P(W) = P(w,w2,)\n",
    "\n",
    "\n",
    "### Markov假设\n",
    "\n",
    "每个单词只跟它之前的N个词有关\n",
    "\n",
    "### 语言模型评价\n",
    "\n",
    "Perplexity\n",
    "\n",
    "### 模型\n",
    "\n",
    "神经网络模型\n",
    "\n",
    "循环神经网络模型\n",
    " 每一步的参数W是固定的，当前隐状态包含所以签名出现的单词信息\n",
    "\n",
    " * 损失函数 Cross Entroy\n",
    " * 梯度优化器：ADAM,SGD，RMSPROP\n",
    " * 训练RNN很难：梯度消失，梯度爆炸\n",
    "\n",
    "LSTM 长短记忆网络 RNN的一种\n",
    " * 记忆细胞\n",
    " * 若干个门控制 记忆状态\n",
    "\n",
    "Gated Recurrent Unit\n",
    " > 比LSTM少了一个门\n",
    "\n",
    "训练技巧： Gradient Cliping\n",
    "\n",
    "使用torchtext\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "source": [],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}